<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current">
        
        <header class="bar bar-nav fs-header-small">
          <a href="${ctx.host}/profile" class="icon icon-left pull-left"></a>
          <h1 class="title">线下代言人信息</h1>
        </header>
        
        <div class="content">
        
           <div class="agent-banner">
            <div class="row">
              <div class="col-50 text-center">
                <span class="word">总购买人数</span><br>
                <span class="amount">${total}</span>
              </div>
              <div class="col-50 text-center">
                <span class="word">总奖励课时</span><br>
                <span class="amount">${courseAmount}</span>
              </div>
            </div>
          </div>          
          <!-- end agent banner -->
          
          <div class="card no-margin">
            <div class="card-header">折扣码</div>
              <div class="card-content">
                <div class="card-content-inner" style="padding:0;">
                  <div class="list-block info-list-item agent-list" style="margin: 0 0.5rem 0 0;">
                    <ul style="border:0;">
                      <li>
                        <div class="item-content item-inner">
                          <div class="item-title">
                                <div class="agent-cover"><i class="icon icon-agent"></i> <span style="font-size:.75rem;">${student.offlineCode}</span></div>
                          </div>
                        </div>
                      </li>
                    </ul>
      
                  </div>
                </div>
              </div>
            </div>
            
            <div class="card no-margin">
            <div class="card-header">详细信息</div>
              <div class="card-content">
                <div class="card-content-inner" style="padding:0;">
                  <div class="list-block info-list-item agent-list" style="margin: 0 0.5rem 0 0;">
                    <ul style="border:0;">
                      <c:forEach var="offlineAgent" items="${offlineAgents}">
                        <li>
                          <div class="item-content item-inner">
                            <div class="item-title">
                                  <div class="agent-cover"><i class="icon icon-agent"></i> <span style="font-size:.75rem;">${offlineAgent.code}</span></div>
                                  购买人&nbsp;${offlineAgent.purchaser},&nbsp;&nbsp;奖励课时&nbsp;${offlineAgent.courseAmount}&nbsp;&nbsp;订单金额&nbsp;<fmt:formatNumber value="${offlineAgent.price/100}" pattern="0.00"/>
                            </div>
                          </div>
                        </li>
                      </c:forEach>
                    </ul>
      
                  </div>
                </div>
              </div>
            </div>
            <!-- End card -->
            
        </div>
        <!-- End Content -->
        
      </div>
    </div>
    
    <%@ include file="/WEB-INF/include/script.jsp"%>
    <d:resource type="script" root="${ctx.resource}/build" src="js/page/profile/profile-online-agent.js" />
    <script type="text/javascript">
      var jsConfig = JSON.parse('${wechatJsConfig}')
      require(['page/profile/profile-online-agent'], function(page) {
        page.init({
          jsConfig: jsConfig
        })
      })
    </script>
   
  </body>
</html>